<template>
  <div>
    <van-nav-bar
      title="系统设置"
      left-text=""
      left-arrow
      @click-left="onClickLeft('myView')" />
    <van-cell-group>
      <van-cell title="意见反馈" is-link @click="opinion('Feedback')" />
      <van-cell title="关于我们" is-link @click="about('AboutUs')" />
    </van-cell-group>
    <div style="border: 8px solid #ebedf0"></div>
    <van-cell-group>
      <van-cell title="检查更新" is-link @click="checkUpdate" />
    </van-cell-group>
    <div style="background: #f6f6f6; height: 480px">
      <div style="height: 480px"></div>
      <van-row>
        <van-col span="9"
          ><van-goods-action-button
            color="#019FE8"
            type="danger"
            @click="SystemSetting()"
            text="修改密码"
        /></van-col>
        <van-col span="6"></van-col>
        <van-col span="9" style="margin-left: -14px"
          ><van-goods-action-button
            color="#019FE8"
            type="danger"
            style="margin-bottom: 0px"
            @click="tuichu()"
            text="退出登录"
        /></van-col>
      </van-row>
      <div style="height: 10px"></div>
    </div>
  </div>
</template>
<script>
import Vue from "vue";
import { Dialog } from "vant";
import { Toast } from "vant";

Vue.use(Toast);

// 全局注册
Vue.use(Dialog);
export default {
  data() {
    return {};
  },
  methods: {
    onClickLeft(uri) {
      this.$router.push(
        uri,
        () => {},
        () => {}
      );
    },
    opinion(uri) {
      this.$router.push(
        uri,
        () => {},
        () => {}
      );
    },
    about(uri) {
      this.$router.push(
        uri,
        () => {},
        () => {}
      );
    },
    checkUpdate() {
      Toast("已经是最新版本了~");
    },
    tuichu() {
      //清除token
      localStorage.removeItem("token");
      //跳转到首页
      this.$router.push("/login");
    },
    SystemSetting() {
      //跳转到首页
      this.$router.push("/ChangePassword");
    },
  },
  components: {
    // 组件注册的地方 相当于pom文件
    // 全局注册
  },
};
</script>
<style>
.van-cell {
  position: relative;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  box-sizing: border-box;
  width: 100%;
  padding: 10px 16px;
  overflow: hidden;
  color: #323233;
  font-size: 16px;
  line-height: 24px;
  text-align: left;
  background-color: #fff;
}
.van-cell::after {
  position: absolute;
  box-sizing: border-box;
  content: " ";
  pointer-events: none;
  right: 16px;
  bottom: 0;
  left: 16px;
  border-bottom: 2px solid #ebedf0;
  -webkit-transform: scaleY(0.8);
  transform: scaleY(0.8);
}
</style>
